﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using SwitchTutorial.DBModels;
using SwitchTutorial.Models;

namespace SwitchTutorial.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Welcome to ASP.NET MVC!";

            var listArticle = new List<Article>();

            var article = new Article();
            article.ArticleName = "HTML5&CSS3 single page layout – Art theme";
            article.Description = "Today I will like to product new great masterpiece – new template with codename: ‘Art theme’. This will nice HTML5 template with nice gray colors. Hope that you will like new styles and you will learn some new coding lessons.";
            article.PathVideo = "../../images/post.png";

            listArticle.Add(article);

            article = new Article();
            article.ArticleName = "HTML CSS Anime Theme Website Layout";
            article.Description = "Today I will like to product new great masterpiece – new template with codename: ‘Art theme’. This will nice HTML5 template with nice gray colors. Hope that you will like new styles and you will learn some new coding lessons.";
            article.PathVideo = "images/post.png";

            listArticle.Add(article);

            var homeVM = new HomeVM();
            homeVM.ListBestArticles = listArticle;
            homeVM.ListNewArticles = listArticle;
            return View(homeVM);
        }

    }
}
    